/*
 * @Author: 0x9DEFA478
 * @Date: 2025-08-17 18:03:39
 * @LastEditTime: 2025-08-17 19:03:43
 * @LastEditors: 0x9DEFA478
 * @Description: 
 * 
 */
#ifndef hHMakeTargetTask_Command_HPP_
#define hHMakeTargetTask_Command_HPP_
#include "HMakeTargetConfig.hpp"
#include "HMakeTargetTask_Abstract.hpp"
#include "HMakeDependencyItem_Instance.hpp"
#include "HMakeLog.hpp"




namespace HMake{

  class TargetTask_Command:public TargetTask{

    public:
      template<typename... T_Arg>
      static Pointer New(T_Arg&&... Args){
        return Pointer(new TargetTask_Command(std::forward<T_Arg>(Args)...));
      }

    public:
      TargetTask_Command(const TargetConfig::Pointer& targetConfig
        ,const DependencyChain::Item::Pointer& hmkFileDependency
        ,const std::string& cwd,const std::string& shell
        ,DependencyItem_Directory::Collection::Pointer& DirectoryCollection
        ,Log::Pointer& log
        ,AttributeMask Attribute);
      ~TargetTask_Command();

      virtual DependencyChain::Item::Pointer MakeTask()override;

    private:
      DependencyChain::Item::Pointer hmkFileDependency;
      DependencyItem_Directory::Collection::Pointer DirectoryCollection;
      Log::Pointer log;
      const std::string cwd;
      
      std::list<Value> command;
      DependencyItem_SystemProcess::Task_Process::IOEncoding io_encoding;
  };

}




#endif //hHMakeTargetTask_Command_HPP_
